// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CourseLocationService.java

package com.nervytech.tutorcruise.db.service.impl;

import com.nervytech.tutorcruise.db.dao.interfaces.ICourseLocationDAO;
import com.nervytech.tutorcruise.db.service.interfaces.ICourseLocationService;
import com.nervytech.tutorcruise.service.exception.TrainerCruiseServiceException;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("courseLocationService")
public class CourseLocationService
    implements ICourseLocationService
{
	@Autowired
    private ICourseLocationDAO courseLocationDao;

    public CourseLocationService()
    {
    }

    public Map<Integer, String> getLocationsMap(long usrId)
        throws TrainerCruiseServiceException
    {
        Map<Integer, String> locMap = new HashMap<Integer, String>();
        try
        {
            locMap = courseLocationDao.getLocationsMap(usrId);
        }
        catch(Exception e)
        {
            e.printStackTrace();
            throw new TrainerCruiseServiceException(e.getMessage());
        }
        return locMap;
    }

}
